package com.mzy.olddate.test.enums;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Ives
 * * @date 2021/9/18
 */
@Getter
public enum OperatingSystemEnum {
  IOS("IOS", "苹果系统"),
  Android("Android", "安卓系统"),
  ;

  private final String code;

  private final String message;

  private OperatingSystemEnum(String code, String message) {
    this.code = code;
    this.message = message;
  }

  public static List<String> toList() {
    ArrayList<String> list = new ArrayList<>();
    for (OperatingSystemEnum operatingSystemEnum : OperatingSystemEnum.values()) {
      list.add(operatingSystemEnum.getCode());
    }
    return list;
  }
}
